import * as actionType from './constants.js'
import {reqshow} from '../../../api/index'

//show页面数据

export const changeShowData = (data) => {
    return {
        type: actionType.CHANGE_SHOWDATA,
        data: data
    }
}

export const getShowData = () => {
    return (dispatch) => {
        reqshow()
            .then((res) => {
                dispatch(changeShowData(res.data.data))
            })
            .catch((e) => {
                console.log('出错了')
            })
    }
}